﻿using Ewelve_Mouth_HD.DAL;
using Ewelve_Mouth_HD.Model;
using MD5Hash;

namespace Ewelve_Mouth_HD.BLL
{
    public class UserBll
    {
        private readonly UserDal userDal;

        public UserBll(UserDal _userDal)
        {
            userDal = _userDal;
        }
        /// <summary>
        /// 用户添加
        /// </summary>
        /// <param name="W"></param>
        /// <returns></returns>
        public int UserAdd(UserInfo W)
        {
            try
            {
                return userDal.UserAdd(W);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="UserName"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public int UserLog(string UserName, string Password)
        {
            try
            {
                return userDal.UserLog(UserName, Password);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
